home *** CD-ROM | disk | FTP | other *** search
/ Freelog 42 / Freelog042.iso / Bas / Jeux / BallBreaker / BallBreaker[1].swf / scripts / frame_15 / DoAction.as
Text File  |  2003-01-12  |  2KB  |  52 lines

  1. VecteurX = random("2");
  2. if(VecteurX == "0")
  3. {
  4.    VecteurX = "-10";
  5. }
  6. else
  7. {
  8.    VecteurX = "10";
  9. }
  10. VecteurY = "-10";
  11. setProperty("/balle", _X, getProperty("/raket", _X) - "5");
  12. setProperty("/balle", _Y, "365");
  13. PowerUp = "0";
  14. if(getProperty("/raket", _X) - LongueurRaket < getProperty("/PowerTaille", _X) and getProperty("/PowerTaille", _X) < getProperty("/raket", _X) + LongueurRaket and getProperty("/raket", _Y) - "10" < getProperty("/PowerTaille", _Y) and getProperty("/PowerTaille", _Y) < getProperty("/raket", _Y) + "10" and getProperty("/PowerTaille", _visible) == "1")
  15. {
  16.    setProperty("/PowerTaille", _visible, "0");
  17.    setProperty("/PowerTaille", _Y, "-20");
  18.    setProperty("/raket", _xscale, getProperty("/raket", _xscale) * "2");
  19.    LongueurRaket *= "2";
  20.    stopDrag();
  21.    startDrag("/raket","1","75","380","375","380");
  22.    Colle = "0";
  23.    gotoAndPlay(17);
  24. }
  25. else if("500" < getProperty("/PowerTaille", _Y))
  26. {
  27.    setProperty("/PowerTaille", _visible, "0");
  28.    setProperty("/PowerTaille", _Y, "-20");
  29.    Taille = "0";
  30. }
  31. else if(getProperty("/PowerTaille", _visible) == "1")
  32. {
  33.    setProperty("/PowerTaille", _Y, getProperty("/PowerTaille", _Y) + "10");
  34. }
  35. PowerScoreCpt = "1";
  36. while("5" >= PowerScoreCpt)
  37. {
  38.    PowerScoreNumero = "PowerScore_" add PowerScoreCpt;
  39.    if(getProperty(PowerScoreNumero, _visible) == "1")
  40.    {
  41.       if(getProperty(PowerScoreNumero, _Y) < "400")
  42.       {
  43.          setProperty(PowerScoreNumero, _Y, getProperty(PowerScoreNumero, _Y) + "10");
  44.       }
  45.       else
  46.       {
  47.          setProperty(PowerScoreNumero, _visible, "0");
  48.       }
  49.    }
  50.    PowerScoreCpt += "1";
  51. }
  52.